<template>

        <div class="table-con">
          <ts-table
            :source="systemTableSource"
            width="100%"
            height="100%"
            ref="systemTable"
          ></ts-table>
        </div>
</template>

<script>
//防止重复提交的指令
export default {
  name: 'biSave',
  data() {
    return {
      systemTableSource: this.systemTableSourceFn(),
      systemList: []
    }
  },
  computed: {},
  created() {
  },
  mounted() {},
  methods: {
    changeMenu(val,a,b){
      debugger
    },
    // 发布内容
    systemTableSourceFn() {
      let source = {
        showOverflow: true,
        editor: true,
        dataType: 'local',
        data:[{
          systemId:'1',
          id:'2'
        }],
        colModel: this.colFn(),
        editConfig: {
          trigger: 'click',
          mode: 'row',
          showStatus: true,
          showAsterisk: true
        }
      }
      return source
    },
    colFn() {
      return [
        {
          title: '应用代码',
          field: 'systemCode',
          width: '80'
        },
        {
          title: '所属菜单',
          field: 'roleCode',
          width: '100',
          editConfig: {
            name: 'treeSelect',
            source: {code: 'code',text: 'name',children: 'children' ,enable:'enable',strictly:true},
            options:[
  {
    "id": "73e740a45e8a4bfa8640c58aa26f53cf",
    "code": "73e740a45e8a4bfa8640c58aa26f53cf",
    "name": "省人医",
    "open": true,
    "icon": null,
    "aliasname": null,
    "pid": "",
    "alink": null,
    "menulevel": null,
    "checked": false,
    "userData": null,
    "children": [
      {
        "id": "73e740a45e8a4bfa8640c58aa26f53cfTSPLAT",
        "code": "TSPLAT",
        "name": "新集成平台",
        "open": false,
        "icon": null,
        "aliasname": null,
        "pid": "73e740a45e8a4bfa8640c58aa26f53cf",
        "alink": null,
        "menulevel": null,
        "checked": false,
        "userData": null,
        "children": [
          {
            "id": "843471A6E73B4C498786C028DF9D46A3",
            "code": "R_JCPT_001",
            "name": "【集成平台】测试角色",
            "open": false,
            "icon": null,
            "aliasname": null,
            "pid": "73e740a45e8a4bfa8640c58aa26f53cfTSPLAT",
            "alink": null,
            "menulevel": null,
            "checked": false,
            "userData": {
              "orgName": "省人医",
              "remark": "【集成平台】测试角色",
              "categoryCode": "TSPLAT",
              "categoryName": "新集成平台",
              "orgId": "73e740a45e8a4bfa8640c58aa26f53cf"
            },
            "children": null,
            "sort": 0,
            "menuOpenWay": null,
            "parent": false
          }
        ],
        "sort": 1,
        "menuOpenWay": null,
        "parent": false
      },
      {
        "id": "73e740a45e8a4bfa8640c58aa26f53cfROLE_CAT_DEFAULT",
        "code": "ROLE_CAT_DEFAULT",
        "name": "默认分类",
        "open": false,
        "icon": null,
        "aliasname": null,
        "pid": "73e740a45e8a4bfa8640c58aa26f53cf",
        "alink": null,
        "menulevel": null,
        "checked": false,
        "userData": null,
        "children": [
          {
            "id": "A36F495FE8A54BF49CFE60182DEDEFC6",
            "code": "test",
            "name": "测试",
            "open": false,
            "icon": null,
            "aliasname": null,
            "pid": "73e740a45e8a4bfa8640c58aa26f53cfROLE_CAT_DEFAULT",
            "alink": null,
            "menulevel": null,
            "checked": false,
            "userData": {
              "orgName": "省人医",
              "remark": null,
              "categoryCode": "ROLE_CAT_DEFAULT",
              "categoryName": "默认分类",
              "orgId": "73e740a45e8a4bfa8640c58aa26f53cf"
            },
            "children": null,
            "sort": 0,
            "menuOpenWay": null,
            "parent": false
          },
          {
            "id": "C57B7AA229BD46C59540773104C7A76D",
            "code": "R_NHFY_TEST001",
            "name": "R_NHFY_TEST001",
            "open": false,
            "icon": null,
            "aliasname": null,
            "pid": "73e740a45e8a4bfa8640c58aa26f53cfROLE_CAT_DEFAULT",
            "alink": null,
            "menulevel": null,
            "checked": false,
            "userData": {
              "orgName": "省人医",
              "remark": "R_NHFY_TEST001",
              "categoryCode": "ROLE_CAT_DEFAULT",
              "categoryName": "默认分类",
              "orgId": "73e740a45e8a4bfa8640c58aa26f53cf"
            },
            "children": null,
            "sort": 0,
            "menuOpenWay": null,
            "parent": false
          }
        ],
        "sort": 1,
        "menuOpenWay": null,
        "parent": false
      }
    ],
    "sort": 1,
    "menuOpenWay": null,
    "parent": true
  },
  {
    "id": "be79c236107c4efab30ef286d0adce17",
    "code": "be79c236107c4efab30ef286d0adce17",
    "name": "南华附一",
    "open": true,
    "icon": null,
    "aliasname": null,
    "pid": "",
    "alink": null,
    "menulevel": null,
    "checked": false,
    "userData": null,
    "children": [
      {
        "id": "be79c236107c4efab30ef286d0adce17schedule",
        "code": "schedule",
        "name": "任务调度中心",
        "open": false,
        "icon": null,
        "aliasname": null,
        "pid": "be79c236107c4efab30ef286d0adce17",
        "alink": null,
        "menulevel": null,
        "checked": false,
        "userData": null,
        "children": [
          {
            "id": "98F7310EC9734955836BDA3EA9FF3E2F",
            "code": "TEST",
            "name": "测试",
            "open": false,
            "icon": null,
            "aliasname": null,
            "pid": "be79c236107c4efab30ef286d0adce17schedule",
            "alink": null,
            "menulevel": null,
            "checked": false,
            "userData": {
              "orgName": "南华附一",
              "remark": null,
              "categoryCode": "schedule",
              "categoryName": "任务调度中心",
              "orgId": "be79c236107c4efab30ef286d0adce17"
            },
            "children": null,
            "sort": 0,
            "menuOpenWay": null,
            "parent": false
          }
        ],
        "sort": 1,
        "menuOpenWay": null,
        "parent": false
      },
      {
        "id": "be79c236107c4efab30ef286d0adce17ROLE_CAT_DEFAULT",
        "code": "ROLE_CAT_DEFAULT",
        "name": "默认分类",
        "open": false,
        "icon": null,
        "aliasname": null,
        "pid": "be79c236107c4efab30ef286d0adce17",
        "alink": null,
        "menulevel": null,
        "checked": false,
        "userData": null,
        "children": [
          {
            "id": "EC8CE4E6A4AF4217AB875EA2F3B69E7I",
            "code": "SYS_ROLE_SUPERVISE",
            "name": "超级管理员角色",
            "open": false,
            "icon": null,
            "aliasname": null,
            "pid": "be79c236107c4efab30ef286d0adce17ROLE_CAT_DEFAULT",
            "alink": null,
            "menulevel": null,
            "checked": false,
            "userData": {
              "orgName": "南华附一",
              "remark": "超级管理员角色",
              "categoryCode": "ROLE_CAT_DEFAULT",
              "categoryName": "默认分类",
              "orgId": "be79c236107c4efab30ef286d0adce17"
            },
            "children": null,
            "sort": 0,
            "menuOpenWay": null,
            "parent": false
          },
          {
            "id": "9F93C721BA9B4663A26CE6DC3DD181E3",
            "code": "test1",
            "name": "测试1",
            "open": false,
            "icon": null,
            "aliasname": null,
            "pid": "be79c236107c4efab30ef286d0adce17ROLE_CAT_DEFAULT",
            "alink": null,
            "menulevel": null,
            "checked": false,
            "userData": {
              "orgName": "南华附一",
              "remark": null,
              "categoryCode": "ROLE_CAT_DEFAULT",
              "categoryName": "默认分类",
              "orgId": "be79c236107c4efab30ef286d0adce17"
            },
            "children": null,
            "sort": 0,
            "menuOpenWay": null,
            "parent": false
          },
          {
            "id": "A4AA8813A4584C1FA326EB391E1C12A8",
            "code": "R_SRY_ALL",
            "name": "省人医管理员",
            "open": false,
            "icon": null,
            "aliasname": null,
            "pid": "be79c236107c4efab30ef286d0adce17ROLE_CAT_DEFAULT",
            "alink": null,
            "menulevel": null,
            "checked": false,
            "userData": {
              "orgName": "南华附一",
              "remark": "省人医管理员",
              "categoryCode": "ROLE_CAT_DEFAULT",
              "categoryName": "默认分类",
              "orgId": "be79c236107c4efab30ef286d0adce17"
            },
            "children": null,
            "sort": 0,
            "menuOpenWay": null,
            "parent": false
          },
          {
            "id": "47C055D7247B418D97835CAC8E2BC083",
            "code": "11",
            "name": "11",
            "open": false,
            "icon": null,
            "aliasname": null,
            "pid": "be79c236107c4efab30ef286d0adce17ROLE_CAT_DEFAULT",
            "alink": null,
            "menulevel": null,
            "checked": false,
            "userData": {
              "orgName": "南华附一",
              "remark": "11",
              "categoryCode": "ROLE_CAT_DEFAULT",
              "categoryName": "默认分类",
              "orgId": "be79c236107c4efab30ef286d0adce17"
            },
            "children": null,
            "sort": 0,
            "menuOpenWay": null,
            "parent": false
          },
          {
            "id": "D5E55FDE38C540DBA1611C94820CE765",
            "code": "R_SCH_ALL",
            "name": "调度任务管理员",
            "open": false,
            "icon": null,
            "aliasname": null,
            "pid": "be79c236107c4efab30ef286d0adce17ROLE_CAT_DEFAULT",
            "alink": null,
            "menulevel": null,
            "checked": false,
            "userData": {
              "orgName": "南华附一",
              "remark": "调度任务管理员",
              "categoryCode": "ROLE_CAT_DEFAULT",
              "categoryName": "默认分类",
              "orgId": "be79c236107c4efab30ef286d0adce17"
            },
            "children": null,
            "sort": 0,
            "menuOpenWay": null,
            "parent": false
          }
        ],
        "sort": 1,
        "menuOpenWay": null,
        "parent": false
      }
    ],
    "sort": 1,
    "menuOpenWay": null,
    "parent": true
  }
],
            nameField: 'name',
            selected: this.changeMenu
          }
        },
      ]
    },
  },
  watch: {}
}
</script>
<style lang="less" scoped>

  .table-con {
    height: calc(100% - 60px);
    margin-left: 110px;
  }
</style>
